//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension AppRegistry {
    // MARK: Enums

    public enum ResourceType: String, CustomStringConvertible, Codable {
        case cfnStack = "CFN_STACK"
        public var description: String { return self.rawValue }
    }

    public enum SyncAction: String, CustomStringConvertible, Codable {
        case noAction = "NO_ACTION"
        case startSync = "START_SYNC"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct Application: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application across services.
        public let arn: String?
        /// The ISO-8601 formatted timestamp of the moment when the application was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the application.
        public let description: String?
        /// The identifier of the application.
        public let id: String?
        ///  The ISO-8601 formatted timestamp of the moment when the application was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the application. The name must be unique in the region in which you are creating the application.
        public let name: String?
        /// Key-value pairs you can use to associate with the application.
        public let tags: [String: String]?

        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
            case tags
        }
    }

    public struct ApplicationSummary: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application across services.
        public let arn: String?
        /// The ISO-8601 formatted timestamp of the moment when the application was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the application.
        public let description: String?
        /// The identifier of the application.
        public let id: String?
        ///  The ISO-8601 formatted timestamp of the moment when the application was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the application. The name must be unique in the region in which you are creating the application.
        public let name: String?

        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
        }
    }

    public struct AssociateAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri(locationName: "application")),
            AWSMemberEncoding(label: "attributeGroup", location: .uri(locationName: "attributeGroup"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String

        public init(application: String, attributeGroup: String) {
            self.application = application
            self.attributeGroup = attributeGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "\\w+")
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "\\w+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociateAttributeGroupResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) of the application that was augmented with attributes.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) of the attribute group that contains the application's new attributes.
        public let attributeGroupArn: String?

        public init(applicationArn: String? = nil, attributeGroupArn: String? = nil) {
            self.applicationArn = applicationArn
            self.attributeGroupArn = attributeGroupArn
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn
            case attributeGroupArn
        }
    }

    public struct AssociateResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri(locationName: "application")),
            AWSMemberEncoding(label: "resource", location: .uri(locationName: "resource")),
            AWSMemberEncoding(label: "resourceType", location: .uri(locationName: "resourceType"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The name or ID of the resource of which the application will be associated.
        public let resource: String
        /// The type of resource of which the application will be associated.
        public let resourceType: ResourceType

        public init(application: String, resource: String, resourceType: ResourceType) {
            self.application = application
            self.resource = resource
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "\\w+")
            try self.validate(self.resource, name: "resource", parent: name, max: 256)
            try self.validate(self.resource, name: "resource", parent: name, min: 1)
            try self.validate(self.resource, name: "resource", parent: name, pattern: "\\S+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AssociateResourceResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) of the application that was augmented with attributes.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String?

        public init(applicationArn: String? = nil, resourceArn: String? = nil) {
            self.applicationArn = applicationArn
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn
            case resourceArn
        }
    }

    public struct AttributeGroup: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the attribute group across services.
        public let arn: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// The globally unique attribute group identifier of the attribute group.
        public let id: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was last updated. This time is the same as the creationTime for a newly created attribute group.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the attribute group.
        public let name: String?
        /// Key-value pairs you can use to associate with the attribute group.
        public let tags: [String: String]?

        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
            case tags
        }
    }

    public struct AttributeGroupSummary: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the attribute group across services.
        public let arn: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// The globally unique attribute group identifier of the attribute group.
        public let id: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was last updated. This time is the same as the creationTime for a newly created attribute group.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the attribute group.
        public let name: String?

        public init(arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
        }
    }

    public struct CreateApplicationRequest: AWSEncodableShape {
        /// A unique identifier that you provide to ensure idempotency. If you retry a request that completed successfully using the same client token and the same parameters, the retry succeeds without performing any further actions. If you retry a successful request using the same client token, but one or more of the parameters are different, the retry fails.
        public let clientToken: String
        /// The description of the application.
        public let description: String?
        /// The name of the application. The name must be unique in the region in which you are creating the application.
        public let name: String
        /// Key-value pairs you can use to associate with the application.
        public let tags: [String: String]?

        public init(clientToken: String = CreateApplicationRequest.idempotencyToken(), description: String? = nil, name: String, tags: [String: String]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 128)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "[a-zA-Z0-9][a-zA-Z0-9_-]*")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "\\w+")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "(?!aws:)[a-zA-Z+-=._:/]+")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case description
            case name
            case tags
        }
    }

    public struct CreateApplicationResponse: AWSDecodableShape {
        /// Information about the application.
        public let application: Application?

        public init(application: Application? = nil) {
            self.application = application
        }

        private enum CodingKeys: String, CodingKey {
            case application
        }
    }

    public struct CreateAttributeGroupRequest: AWSEncodableShape {
        /// A JSON string in the form of nested key-value pairs that represent the attributes in the group and describes an application and its components.
        public let attributes: String
        /// A unique identifier that you provide to ensure idempotency. If you retry a request that completed successfully using the same client token and the same parameters, the retry succeeds without performing any further actions. If you retry a successful request using the same client token, but one or more of the parameters are different, the retry fails.
        public let clientToken: String
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// The name of the attribute group.
        public let name: String
        /// Key-value pairs you can use to associate with the attribute group.
        public let tags: [String: String]?

        public init(attributes: String, clientToken: String = CreateAttributeGroupRequest.idempotencyToken(), description: String? = nil, name: String, tags: [String: String]? = nil) {
            self.attributes = attributes
            self.clientToken = clientToken
            self.description = description
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.attributes, name: "attributes", parent: name, max: 8000)
            try self.validate(self.attributes, name: "attributes", parent: name, min: 1)
            try self.validate(self.attributes, name: "attributes", parent: name, pattern: "[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 128)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "[a-zA-Z0-9][a-zA-Z0-9_-]*")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "\\w+")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "(?!aws:)[a-zA-Z+-=._:/]+")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case clientToken
            case description
            case name
            case tags
        }
    }

    public struct CreateAttributeGroupResponse: AWSDecodableShape {
        /// Information about the attribute group.
        public let attributeGroup: AttributeGroup?

        public init(attributeGroup: AttributeGroup? = nil) {
            self.attributeGroup = attributeGroup
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroup
        }
    }

    public struct DeleteApplicationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri(locationName: "application"))
        ]

        /// The name or ID of the application.
        public let application: String

        public init(application: String) {
            self.application = application
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "\\w+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteApplicationResponse: AWSDecodableShape {
        /// Information about the deleted application.
        public let application: ApplicationSummary?

        public init(application: ApplicationSummary? = nil) {
            self.application = application
        }

        private enum CodingKeys: String, CodingKey {
            case application
        }
    }

    public struct DeleteAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "attributeGroup", location: .uri(locationName: "attributeGroup"))
        ]

        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String

        public init(attributeGroup: String) {
            self.attributeGroup = attributeGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "\\w+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteAttributeGroupResponse: AWSDecodableShape {
        /// Information about the deleted attribute group.
        public let attributeGroup: AttributeGroupSummary?

        public init(attributeGroup: AttributeGroupSummary? = nil) {
            self.attributeGroup = attributeGroup
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroup
        }
    }

    public struct DisassociateAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri(locationName: "application")),
            AWSMemberEncoding(label: "attributeGroup", location: .uri(locationName: "attributeGroup"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String

        public init(application: String, attributeGroup: String) {
            self.application = application
            self.attributeGroup = attributeGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "\\w+")
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "\\w+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateAttributeGroupResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) that specifies the attribute group.
        public let attributeGroupArn: String?

        public init(applicationArn: String? = nil, attributeGroupArn: String? = nil) {
            self.applicationArn = applicationArn
            self.attributeGroupArn = attributeGroupArn
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn
            case attributeGroupArn
        }
    }

    public struct DisassociateResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri(locationName: "application")),
            AWSMemberEncoding(label: "resource", location: .uri(locationName: "resource")),
            AWSMemberEncoding(label: "resourceType", location: .uri(locationName: "resourceType"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The name or ID of the resource.
        public let resource: String
        /// The type of the resource that is being disassociated.
        public let resourceType: ResourceType

        public init(application: String, resource: String, resourceType: ResourceType) {
            self.application = application
            self.resource = resource
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "\\w+")
            try self.validate(self.resource, name: "resource", parent: name, max: 256)
            try self.validate(self.resource, name: "resource", parent: name, min: 1)
            try self.validate(self.resource, name: "resource", parent: name, pattern: "\\S+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateResourceResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String?

        public init(applicationArn: String? = nil, resourceArn: String? = nil) {
            self.applicationArn = applicationArn
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn
            case resourceArn
        }
    }

    public struct GetApplicationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri(locationName: "application"))
        ]

        /// The name or ID of the application.
        public let application: String

        public init(application: String) {
            self.application = application
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "\\w+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetApplicationResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the application across services.
        public let arn: String?
        /// The number of top-level resources that were registered as part of this application.
        public let associatedResourceCount: Int?
        /// The ISO-8601 formatted timestamp of the moment when the application was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the application.
        public let description: String?
        /// The identifier of the application.
        public let id: String?
        /// The ISO-8601 formatted timestamp of the moment when the application was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the application. The name must be unique in the region in which you are creating the application.
        public let name: String?
        /// Key-value pairs associated with the application.
        public let tags: [String: String]?

        public init(arn: String? = nil, associatedResourceCount: Int? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.associatedResourceCount = associatedResourceCount
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case associatedResourceCount
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
            case tags
        }
    }

    public struct GetAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "attributeGroup", location: .uri(locationName: "attributeGroup"))
        ]

        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String

        public init(attributeGroup: String) {
            self.attributeGroup = attributeGroup
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "\\w+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetAttributeGroupResponse: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the attribute group across services.
        public let arn: String?
        /// A JSON string in the form of nested key-value pairs that represent the attributes in the group and describes an application and its components.
        public let attributes: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var creationTime: Date?
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// The identifier of the attribute group.
        public let id: String?
        /// The ISO-8601 formatted timestamp of the moment the attribute group was last updated. This time is the same as the creationTime for a newly created attribute group.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var lastUpdateTime: Date?
        /// The name of the attribute group.
        public let name: String?
        /// Key-value pairs associated with the attribute group.
        public let tags: [String: String]?

        public init(arn: String? = nil, attributes: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastUpdateTime: Date? = nil, name: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.attributes = attributes
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastUpdateTime = lastUpdateTime
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case attributes
            case creationTime
            case description
            case id
            case lastUpdateTime
            case name
            case tags
        }
    }

    public struct ListApplicationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.
        public let maxResults: Int?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[A-Za-z0-9+/=]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListApplicationsResponse: AWSDecodableShape {
        /// This list of applications.
        public let applications: [ApplicationSummary]?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(applications: [ApplicationSummary]? = nil, nextToken: String? = nil) {
            self.applications = applications
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case applications
            case nextToken
        }
    }

    public struct ListAssociatedAttributeGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri(locationName: "application")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.
        public let maxResults: Int?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(application: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.application = application
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "\\w+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[A-Za-z0-9+/=]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAssociatedAttributeGroupsResponse: AWSDecodableShape {
        /// A list of attribute group IDs.
        public let attributeGroups: [String]?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(attributeGroups: [String]? = nil, nextToken: String? = nil) {
            self.attributeGroups = attributeGroups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroups
            case nextToken
        }
    }

    public struct ListAssociatedResourcesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri(locationName: "application")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The name or ID of the application.
        public let application: String
        /// The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.
        public let maxResults: Int?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(application: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.application = application
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "\\w+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[A-Za-z0-9+/=]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAssociatedResourcesResponse: AWSDecodableShape {
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?
        /// Information about the resources.
        public let resources: [ResourceInfo]?

        public init(nextToken: String? = nil, resources: [ResourceInfo]? = nil) {
            self.nextToken = nextToken
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resources
        }
    }

    public struct ListAttributeGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The upper bound of the number of results to return (cannot exceed 25). If this parameter is omitted, it defaults to 25. This value is optional.
        public let maxResults: Int?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 25)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "[A-Za-z0-9+/=]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAttributeGroupsResponse: AWSDecodableShape {
        /// This list of attribute groups.
        public let attributeGroups: [AttributeGroupSummary]?
        /// The token to use to get the next page of results after a previous API call.
        public let nextToken: String?

        public init(attributeGroups: [AttributeGroupSummary]? = nil, nextToken: String? = nil) {
            self.attributeGroups = attributeGroups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroups
            case nextToken
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri(locationName: "resourceArn"))
        ]

        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1600)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:([a-z]{2}(-gov)?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags on the resource.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct ResourceInfo: AWSDecodableShape {
        /// The Amazon resource name (ARN) that specifies the resource across services.
        public let arn: String?
        /// The name of the resource.
        public let name: String?

        public init(arn: String? = nil, name: String? = nil) {
            self.arn = arn
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case name
        }
    }

    public struct SyncResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resource", location: .uri(locationName: "resource")),
            AWSMemberEncoding(label: "resourceType", location: .uri(locationName: "resourceType"))
        ]

        /// An entity you can work with and specify with a name or ID. Examples include an Amazon EC2 instance, an AWS CloudFormation stack, or an Amazon S3 bucket.
        public let resource: String
        /// The type of resource of which the application will be associated.
        public let resourceType: ResourceType

        public init(resource: String, resourceType: ResourceType) {
            self.resource = resource
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.resource, name: "resource", parent: name, max: 256)
            try self.validate(self.resource, name: "resource", parent: name, min: 1)
            try self.validate(self.resource, name: "resource", parent: name, pattern: "\\S+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct SyncResourceResponse: AWSDecodableShape {
        /// The results of the output if an application is associated with an ARN value, which could be syncStarted or None.
        public let actionTaken: SyncAction?
        /// The Amazon resource name (ARN) that specifies the application.
        public let applicationArn: String?
        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String?

        public init(actionTaken: SyncAction? = nil, applicationArn: String? = nil, resourceArn: String? = nil) {
            self.actionTaken = actionTaken
            self.applicationArn = applicationArn
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case actionTaken
            case applicationArn
            case resourceArn
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri(locationName: "resourceArn"))
        ]

        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String
        /// The new or modified tags for the resource.
        public let tags: [String: String]

        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1600)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:([a-z]{2}(-gov)?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "(?!aws:)[a-zA-Z+-=._:/]+")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri(locationName: "resourceArn")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring(locationName: "tagKeys"))
        ]

        /// The Amazon resource name (ARN) that specifies the resource.
        public let resourceArn: String
        /// A list of the tag keys to remove from the specified resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 1600)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:([a-z]{2}(-gov)?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "(?!aws:)[a-zA-Z+-=._:/]+")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 0)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateApplicationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "application", location: .uri(locationName: "application"))
        ]

        /// The name or ID of the application that will be updated.
        public let application: String
        /// The new description of the application.
        public let description: String?
        /// The new name of the application. The name must be unique in the region in which you are updating the application.
        public let name: String?

        public init(application: String, description: String? = nil, name: String? = nil) {
            self.application = application
            self.description = description
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.application, name: "application", parent: name, max: 256)
            try self.validate(self.application, name: "application", parent: name, min: 1)
            try self.validate(self.application, name: "application", parent: name, pattern: "\\w+")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "\\w+")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case name
        }
    }

    public struct UpdateApplicationResponse: AWSDecodableShape {
        /// The updated information of the application.
        public let application: Application?

        public init(application: Application? = nil) {
            self.application = application
        }

        private enum CodingKeys: String, CodingKey {
            case application
        }
    }

    public struct UpdateAttributeGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "attributeGroup", location: .uri(locationName: "attributeGroup"))
        ]

        /// The name or ID of the attribute group that holds the attributes to describe the application.
        public let attributeGroup: String
        /// A JSON string in the form of nested key-value pairs that represent the attributes in the group and describes an application and its components.
        public let attributes: String?
        /// The description of the attribute group that the user provides.
        public let description: String?
        /// The new name of the attribute group. The name must be unique in the region in which you are updating the attribute group.
        public let name: String?

        public init(attributeGroup: String, attributes: String? = nil, description: String? = nil, name: String? = nil) {
            self.attributeGroup = attributeGroup
            self.attributes = attributes
            self.description = description
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, max: 256)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, min: 1)
            try self.validate(self.attributeGroup, name: "attributeGroup", parent: name, pattern: "\\w+")
            try self.validate(self.attributes, name: "attributes", parent: name, max: 8000)
            try self.validate(self.attributes, name: "attributes", parent: name, min: 1)
            try self.validate(self.attributes, name: "attributes", parent: name, pattern: "[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "\\w+")
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case description
            case name
        }
    }

    public struct UpdateAttributeGroupResponse: AWSDecodableShape {
        /// The updated information of the attribute group.
        public let attributeGroup: AttributeGroup?

        public init(attributeGroup: AttributeGroup? = nil) {
            self.attributeGroup = attributeGroup
        }

        private enum CodingKeys: String, CodingKey {
            case attributeGroup
        }
    }
}
